﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SpeakupBackend
{
    [Serializable]
    public class GoogleCalendarOptions
    {
        private static readonly string GmailPostfix = "@gmail.com";

        private String m_name;
        public String Name
        {
            set
            {
                m_name = value;
                if (m_name != null && m_name.Length > 0)
                {
                    m_name = m_name.Trim();
                    if (!m_name.EndsWith(GmailPostfix))
                    {
                        m_name += GmailPostfix;
                    }
                }
            }
            get
            {
                return m_name;
            }
        }

        private string m_password;
        public String Password
        {
            get
            {
                return m_password;
            }
            set
            {
                m_password = value;
            }
        }

        private bool m_enabled = false;
        public bool IsEnabled
        {
            get
            {
                return m_enabled;
            }
            set
            {
                m_enabled = value;
            }
        }

        private Reminder m_reminder;
        public Reminder Reminder
        {
            get
            {
                return m_reminder;
            }
            set
            {
                m_reminder = value;
            }
        }
    }
}
